package com.charm.frameworkarou.recycleadapter

import android.view.ViewGroup
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder

/**
 * Created by tools on 2018/1/26.
 */
abstract class QuickRecyAdapter<T>(data: List<T>?) : BaseQuickAdapter<T, BaseViewHolder>(data) {
    override fun createBaseViewHolder(parent: ViewGroup, layoutResId: Int): BaseViewHolder {
        return super.createBaseViewHolder(parent, getLayoutResId())
    }

    /**
     * @return 单布局的布局资源 - R.layout...
     */
    protected abstract fun getLayoutResId(): Int
}